﻿<link href="@Url.Content("~/Content/GreenNews.css")" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
<link rel="stylesheet" href="/resources/demos/style.css" />
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<script src="@Url.Content("~/Scripts/GreenNews.js")" type="text/javascript"></script>


@model IEnumerable<XichLoGreen.Models.NewsModel>
@using System.Data.Entity;
@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<ul class="news-list">
    @for (int i = 0; i < Model.Count(); i++)
    {
        <li>
            <div class="news-container">
                <div class="news-article">
                    <div class="news-title">
                        <h5>
                            <span>
                                <a href="#">@Model.ElementAt(i).Title</a>
                            </span>
                        </h5>
                    </div>
                    <div class="news-content">
                        <span>@Model.ElementAt(i).Summary</span>
                    </div>
                </div>
                <div class="news-toolbar">
                    <a class="edit" title="Edit" href="@Url.Action("Edit", "GreenNews", new { id = Model.ElementAt(i).ID })">
                        <img src="@Url.Content("~/Content/img/icon/edit-icon.png")" />
                    </a>
                    <a class="delete" title="Delete" href="@Url.Action("Edit", "GreenNews", new {  id = Model.ElementAt(i).ID})">
                        <img src="@Url.Content("~/Content/img/icon/delete-icon.png")" />
                    </a>
                </div>
            </div>
        </li>   
    }
</ul>


